package com.techstar.mqttprocesser.service.mqtt.model;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author lilei
 * @create 2025-03-27-2025/3/27
 */
@Getter
@AllArgsConstructor
public enum DeviceType {
    luzhou("luzhou", "泸州项目"),

    ;

    private String code;
    private String name;


    public static DeviceType getByCode(String code) {
        for (DeviceType value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
